<template>
  <component :is="allMap.get(compInfo.flag)" v-model="compInfo"></component>
</template>

<script setup lang="ts">
import type { Component as VueComp } from 'vue'
import { OneDivLayoutComp } from './layout-components/index'
import { TextComp } from './basic-components/index'

const allMap = new Map<string, VueComp>()
allMap.set('OneDivLayoutComp', OneDivLayoutComp)
allMap.set('TextComp', TextComp)

const compInfo = defineModel<DesignComp>({
  required: true
})
</script>

<style scoped></style>
